//
//  BKZhaoShengView.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/6/1.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKZhaoShengView.h"
#import "BKZhaoShengTableViewCell.h"

static NSString *zhaoshengCell = @"zhaosheng";
@implementation BKZhaoShengView

- (void)awakeFromNib{

    [_tableView registerNib:[UINib nibWithNibName:NSStringFromClass([BKZhaoShengTableViewCell class]) bundle:nil] forCellReuseIdentifier:zhaoshengCell];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    _tableView.separatorColor= [UIColor clearColor];
  

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    BKZhaoShengTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:zhaoshengCell];
    if (indexPath.row%2==0) {
        cell.backgroundColor = [UIColor clearColor];
    }else{
        cell.backgroundColor = [UIColor colorWithRed:0.914 green:0.965 blue:0.980 alpha:1.000];
    }
    
    
    cell.zhuanye.text = _dataArray[indexPath.row][@"mname"];
    cell.jihua.text = _dataArray[indexPath.row][@"zong"];
    
    return cell;
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return [_dataArray count]+1;
}



-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 34;
}


- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
    
    return [UIView new];
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    
    return 1;
}

@end
